class AddCreatedAtAndUpdatedAt < ActiveRecord::Migration
  def self.up
    add_column  :item_crawl_comments, :created_at, :datetime, :after => 'status'
    add_column  :item_crawl_comments, :updated_at, :datetime, :after => 'created_at'
    add_column  :shop_alliances,      :created_at, :datetime, :after => 'status'
    add_column  :shop_alliances,      :updated_at, :datetime, :after => 'created_at'
    add_column  :user_abuse_reports,  :created_at, :datetime, :after => 'process_time'
    add_column  :user_abuse_reports,  :updated_at, :datetime, :after => 'created_at'
    add_column  :user_photo_pictures, :created_at, :datetime, :after => 'flag'
    add_column  :user_photo_pictures, :updated_at, :datetime, :after => 'created_at'
    add_column  :user_verifies,       :created_at, :datetime, :after => 'status'
    add_column  :user_verifies,       :updated_at, :datetime, :after => 'created_at'
    add_column  :pictures,       :created_at, :datetime, :after => 'status'
    add_column  :pictures,       :updated_at, :datetime, :after => 'created_at'
  end

  def self.down
    remove_column :item_crawl_comments,  :created_at
    remove_column :item_crawl_comments,  :updated_at
    remove_column :shop_alliances,  :created_at
    remove_column :shop_alliances,  :updated_at
    remove_column :user_abuse_reports,  :created_at
    remove_column :user_abuse_reports,  :updated_at
    remove_column :user_photo_pictures,  :created_at
    remove_column :user_photo_pictures,  :updated_at
    remove_column :user_verifies,  :created_at
    remove_column :user_verifies,  :updated_at
    remove_column :pictures,  :created_at
    remove_column :pictures,  :updated_at
  end
end
